< previous page page_207 next page >

Page 207
Use the information in Table 6.7 to set the properties of the command button.
Table 6.7. Property settings for the Print command button.
ControlPropertiesSettings
Command ButtonNamecmdPrint
Caption&Print
FontMs Sans Serif
Regular, 8 point
Height330
Left7440
Top4080
Width1200

Now add the following line of code behind the cmdPrint_Click event (this code line starts Crystal Reports Pro):
Private Sub cmdPrint_Click()
   CrystalReport1.Action = 1 'force Crystal Reports Pro to run report
End Sub
Now save and run the program. When you click the Print button, Crystal Reports Pro creates the report and sends it to a screen window. You can preview this report in the window and, if you like, use the Print button on the report window toolbar to send the report to the printer. (See Figure 6.22.)
0207-01.jpg
Figure 6.22.
Viewing the report from Visual Basic 5.

 
< previous page page_207 next page >

If you like this book, buy it!